<h1>{$content.title}</h1>
<br />
Before the selected movies can be added to your collection, please provide the following details about each movie.<br /><br />

<form method="post" action="index.php" name="frm_add">
<input type="hidden" name="what" value="mymovies" />
<input type="hidden" name="do" value="process" />
<input type="hidden" name="action" value="{$content.action}" />
{foreach from=$content.movies key=k item=m name=movies}
<input type="hidden" name="id[]" value="{$k}" />
<input type="hidden" name="own_id[{$k}]" value="{$content.mdata[$k].own_id}" class="not_req" />
<input type="hidden" id="medium[{$k}]" name="medium[{$k}]" value="{$content.mdata[$k].medium}" />
<input type="hidden" id="format[{$k}]" name="format[{$k}]" value="{$content.mdata[$k].format}" />
<input type="hidden" id="ratio[{$k}]" name="ratio[{$k}]" value="{$content.mdata[$k].ratio}" />
<input type="hidden" id="language[{$k}]" name="language[{$k}]" value="{$content.mdata[$k].language}" />
<input type="hidden" id="subtitle[{$k}]" name="subtitle[{$k}]" value="{$content.mdata[$k].subtitle}" class="not_req" />
<input type="hidden" id="sound[{$k}]" name="sound[{$k}]" value="{$content.mdata[$k].sound}" />
<input type="hidden" id="comment[{$k}]" name="comment[{$k}]" value="{$content.mdata[$k].comments}" class="not_req" />
<input type="hidden" id="rating[{$k}]" name="rating[{$k}]" value="{$content.mdata[$k].rating}" />
{if $smarty.foreach.movies.first}
<script type="text/javascript">
	mymovies_save_setmovie({$k});
	window.onload = mymovies_onload;
</script>
{/if}
{/foreach}
<table align="center" class="data_table" width="70%" cellpadding="5" cellspacing="0">
	<tr>
		<td align="right" class="data_table_header">
			Movie: <select name="movie_select" id="movie_select" onChange="mymovies_save_change_movie(this.value);">{html_options options=$content.movies}</select>
			<input id="btn_prev" type="button" disabled="disabled" value="&laquo;" onclick="mymovies_move(-1);" /><input id="btn_next" type="button" value="&raquo;" onclick="mymovies_move(1);" />
		</td>
	</tr>
	<tr>
		<td>
			<strong>Medium</strong>
			<select id="dtls_medium" name="dtls_medium" onChange="m(mm_save_movie_id);">{foreach from=$content.medium item=m}<option value="{$m}">{$m}</option>{/foreach}</select>

			<strong>Format</strong>
			<select id="dtls_format" name="dtls_format" onChange="m(mm_save_movie_id);">{foreach from=$content.format item=f}<option value="{$f}">{$f}</option>{/foreach}</select>

			<strong>Ratio</strong>
			<select id="dtls_ratio" name="dtls_ratio" onChange="m(mm_save_movie_id);">{foreach from=$content.ratio item=r}<option value="{$r}">{$r}</option>{/foreach}</select><br />


			<strong>Language</strong>
			{foreach from=$content.language item=l name=language}<label for="language_{$smarty.foreach.language.iteration}"><input id="language_{$smarty.foreach.language.iteration}" type="checkbox" name="dtls_language[]" value="{$l}" onClick="m(mm_save_movie_id);" /> {$l|capitalize:true}</label> {/foreach}<br />

			<strong>Subtitle</strong>
			{foreach from=$content.subtitle item=s name=subtitle}<label for="subtitle_{$smarty.foreach.subtitle.iteration}"><input id="subtitle_{$smarty.foreach.subtitle.iteration}" type="checkbox" name="dtls_subtitle[]" value="{$s}" onClick="m(mm_save_movie_id);" /> {$s|capitalize:true}</label> {/foreach}<br />

			<strong>Sound</strong>
			{foreach from=$content.sound item=s name=sound}<label for="sound_{$smarty.foreach.sound.iteration}"><input id="sound_{$smarty.foreach.sound.iteration}" type="checkbox" name="dtls_sound[]" value="{$s}" onClick="m(mm_save_movie_id);" /> {$s|capitalize:true}</label> {/foreach}<br />

			<table>
				<tr>
					<td><input onClick="m(mm_save_movie_id);" type="radio" name="dtls_rating" value="0" checked /> No Rating</td>
					<td><input onClick="m(mm_save_movie_id);" type="radio" name="dtls_rating" value="1" /> 1</td>
					<td><input onClick="m(mm_save_movie_id);" type="radio" name="dtls_rating" value="2" /> 2</td>
					<td><input onClick="m(mm_save_movie_id);" type="radio" name="dtls_rating" value="3" /> 3</td>
					<td><input onClick="m(mm_save_movie_id);" type="radio" name="dtls_rating" value="4" /> 4</td>
					<td><input onClick="m(mm_save_movie_id);" type="radio" name="dtls_rating" value="5" /> 5</td>
					<td><input onClick="m(mm_save_movie_id);" type="radio" name="dtls_rating" value="6" /> 6</td>
					<td><input onClick="m(mm_save_movie_id);" type="radio" name="dtls_rating" value="7" /> 7</td>
					<td><input onClick="m(mm_save_movie_id);" type="radio" name="dtls_rating" value="8" /> 8</td>
					<td><input onClick="m(mm_save_movie_id);" type="radio" name="dtls_rating" value="9" /> 9</td>
					<td><input onClick="m(mm_save_movie_id);" type="radio" name="dtls_rating" value="10" checked /> 10</td>
				</tr>
			</table>

			<strong>Comments</strong><br />
			<textarea id="dtls_comment" cols="40" rows="8" onKeyUp="m(mm_save_movie_id);"></textarea><br />
		</td>
	</tr>
</table>
<br />
<table align="center" width="70%">
	<tr><td align="right">
		<label for="ignore"><input type="checkbox" name="ignore" id="ignore" value="1" onClick="mymovies_check_ignore(this.checked, true);" {if $content.action == "edit"}disabled{/if} /> Ignore the details of my collection just add it!</label><br />
	</td></tr>
	<tr><td align="right">
		<input type="button" value="&laquo; Cancel" /> <input type="submit" id="submit" value="Completed &raquo;" disabled />
	</td></tr>
</table>
</form>